package com.ethink.order.facadeImpl;

import com.ethink.order.api.OrderServiceStatusFacade;
import com.ethink.order.api.PurchaseReturnOrderFacade;
import com.ethink.order.api.enums.TobSaleOrderOrderStatusEnum;
import com.ethink.order.api.request.TobSaleOrderSetStatusRequest;
import com.ethink.order.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author default
 * @version 1.0.0
 * @ClassName OrderServiceStatusFacadeImpl.java
 * @Description
 * @createTime 2022年12月16日 11:20:00
 */
@RestController
@Slf4j
@RequestMapping("order-service/facade/v1/orderStatus")
public class OrderServiceStatusFacadeImpl implements OrderServiceStatusFacade {

    @Autowired
    private TobSaleOrderService tobSaleOrderService;

    @Autowired
    private PurchaseOrderService purchaseOrderService;

    @Autowired
    private PurchaseReturnOrderService purchaseReturnOrderService;

    @Autowired
    private SaleOrderService saleOrderService;

    @Autowired
    private SaleReturnOrderService saleReturnOrderService;

    @Autowired
    private TobSaleReturnOrderService tobSaleReturnOrderService;

    @Override
    public Boolean tobSaleOrderStatus(List<String> orderNo) {
        return tobSaleOrderService.settleStatus(orderNo);
    }

    @Override
    public Boolean purchaseOrderStatusFinish(List<String> orderNo) {
        return purchaseOrderService.purchaseOrderFinish(orderNo);
    }

    @Override
    public Boolean purchaseReturnOrderStatusFinish(List<String> orderNo) {
        return purchaseReturnOrderService.purchaseReturnOrderStatusFinish(orderNo);
    }

    @Override
    public Boolean saleOrderStatusFinish(List<String> orderNo) {
        return saleOrderService.saleOrderStatusFinish(orderNo);
    }

    @Override
    public Boolean saleReturnOrderStatusFinish(List<String> orderNo) {
        return saleReturnOrderService.saleReturnOrderStatusFinish(orderNo);
    }

    @Override
    public Boolean tobSaleReturnOrderStatusFinish(List<String> orderNo) {
        return tobSaleReturnOrderService.tobSaleReturnOrderStatusFinish(orderNo);
    }

    @Override
    public Boolean purchasePayTag(String orderNo) {
        return purchaseOrderService.purchasePayTag(orderNo);
    }
}
